package com.tryedhp.signtool;

import android.graphics.drawable.Drawable;

import me.zhouzhuo.zzletterssidebar.anotation.Letter;
import me.zhouzhuo.zzletterssidebar.entity.SortModel;

/**
 * @author tryedhp
 * @date 2019/6/11 13:46
 * @E-mail try2017yx@163.com
 */
public class AppInfoModel  extends SortModel {

    private String SHA1;
    private String SHA256;
    private String MD5;

    private String packageName;
    @Letter(isSortField = true)
    private String name;
    private Drawable icon;
    private String packagePath;
    private String versionName;
    private int versionCode;
    private boolean isSystem;

    public AppInfoModel(String packageName, String name, Drawable icon, String packagePath, String versionName, int versionCode, boolean isSystem) {
        this.setName(name);
        this.setIcon(icon);
        this.setPackageName(packageName);
        this.setPackagePath(packagePath);
        this.setVersionName(versionName);
        this.setVersionCode(versionCode);
        this.setSystem(isSystem);
    }

    public String getSHA1() {
        return SHA1;
    }

    public void setSHA1(String SHA1) {
        this.SHA1 = SHA1;
    }

    public String getSHA256() {
        return SHA256;
    }

    public void setSHA256(String SHA256) {
        this.SHA256 = SHA256;
    }

    public String getMD5() {
        return MD5;
    }

    public void setMD5(String MD5) {
        this.MD5 = MD5;
    }

    public Drawable getIcon() {
        return icon;
    }

    public void setIcon(final Drawable icon) {
        this.icon = icon;
    }

    public boolean isSystem() {
        return isSystem;
    }

    public void setSystem(final boolean isSystem) {
        this.isSystem = isSystem;
    }

    public String getPackageName() {
        return packageName;
    }

    public void setPackageName(final String packageName) {
        this.packageName = packageName;
    }

    public String getName() {
        return name;
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getPackagePath() {
        return packagePath;
    }

    public void setPackagePath(final String packagePath) {
        this.packagePath = packagePath;
    }

    public int getVersionCode() {
        return versionCode;
    }

    public void setVersionCode(final int versionCode) {
        this.versionCode = versionCode;
    }

    public String getVersionName() {
        return versionName;
    }

    public void setVersionName(final String versionName) {
        this.versionName = versionName;
    }

    @Override
    public String toString() {
        return "{" +
                "\n  pkg name: " + getPackageName() +
                "\n  app icon: " + getIcon() +
                "\n  app name: " + getName() +
                "\n  app path: " + getPackagePath() +
                "\n  app MD5: " + getMD5() +
                "\n  app SHA1: " + getSHA1() +
                "\n  app SHA256: " + getSHA256() +
                "\n  app v name: " + getVersionName() +
                "\n  app v code: " + getVersionCode() +
                "\n  is system: " + isSystem() +
                "}";
    }
}
